package com.a1anwang.okble.server.core;

import com.a1anwang.okble.common.OKBLECharacteristicModel;
import com.a1anwang.okble.common.OKBLEServiceModel;

import java.util.List;

/**
 * Created by a1anwang.com on 2018/5/30.
 */

public class OKBLEServerOperation {
    /**
     * List<OKBLECharacteristicModel>
     */
    public List<OKBLECharacteristicModel> characteristicModels;
    /**
     * OKBLEServiceModel  自定义类
     */
    public OKBLEServiceModel serviceModel;
    /**
     * BLEServerOperationListener 自定义监听
     */
    public BLEServerOperationListener operationListener;

    /**
     * 监听
     */
    public interface BLEServerOperationListener {

        /**
         * service UUID不合法
         */
        int Operation_FAILED_Invalid_Service_UUID = 1;

        /**
         * Characteristic UUID不合法
         */
        int Operation_FAILED_Invalid_Characteristic_UUID = 2;

        /**
         * BLE内部操作返回失败
         */
        int Operation_FAILED_BLE_Failed = 7;

        /**
         * 添加特征失败
         *
         * @param errorCode errorCode
         * @param errorMsg errorMsg
         */
        void onAddCharacteristicFailed(int errorCode, String errorMsg);
        /**
         * 关于添加特征成功
         */
        void onAddCharacteristicSuccess();
    }
}
